package cn.tedu.ivos.audit.mapper;

import cn.tedu.ivos.audit.pojo.dto.AuditQuery;
import cn.tedu.ivos.audit.pojo.entity.Audit;
import cn.tedu.ivos.audit.pojo.vo.AuditVO;
import org.springframework.stereotype.Repository;

import java.util.List;

/***
 * 审批人持久层接口
 */
@Repository
public interface AuditMapper {
    /**插入一个审批人对象到mysql*/
    void insert(Audit audit);
    /**根据id查询审批人对象AuditVO返回给ApplicationServiceImpl*/
    List<AuditVO> selectAuditByAppId(Long appId);
    /**根据applicationId删除audit表的所有审批数据(供ApplicationMapper的cancelApp()方法用)*/
    void deleteByApplicationId(Long id);

    List<AuditVO> selectAudit(AuditQuery auditQuery);

    void update(Audit audit);

    /**根据申请单id查询批此申请单的所有未审批的审批单总数*/
    Integer selectRestAuditCount(AuditQuery auditQuery);//审批单状态 10待我审核 20待他人审核 30已审核 40驳回

    void deleteById(Long id);
}
